-- GENERATED SPELL FOR [Banal Spirit] --


function spell0_14514(pUnit, Event) --@Befuddlement,n/a--
pUnit:FullCastSpellOnTarget(8140,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_14514', 15253, 1)
end

function spell1_14514(pUnit, Event) --@Demoralize,n/a--
pUnit:FullCastSpellOnTarget(23262,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_14514', 30309, 1)
end

function Sorts_14514(pUnit, Event)
local choix_sorts_14514 = math.random(0, 1)
if choix_sorts_14514 == 0 then
pUnit:RegisterEvent('spell0_14514', 1, 1)
end
if choix_sorts_14514 == 1 then
pUnit:RegisterEvent('spell1_14514', 1, 1)
end
end

function mob14514_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_14514', math.random(1500, 3000), 1)
end

function mob14514_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob14514_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob14514_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(14514, 1, 'mob14514_Action')
RegisterUnitEvent(14514, 2, 'mob14514_Leave')
RegisterUnitEvent(14514, 3, 'mob14514_Kill')
RegisterUnitEvent(14514, 4, 'mob14514_Die')
